Import
Usage
Parameters
GetSingleTokenBalanceArgs
HooksOptions
Return Type
The hook returns a React Query result object with the following properties:TokenBalance
The returned data contains token balance information:Notes
This hook provides a convenient way to fetch token balances for specific accounts and contracts. Key features:- Native Token Support: Use
ZERO_ADDRESSfor native tokens (ETH, MATIC, etc.) - ERC20 Support: Works with any ERC20 token contract
- NFT Support: Supports ERC721 and ERC1155 tokens with optional
tokenId - Caching: Uses React Query for efficient caching and background updates
- Error Handling: Provides error states for failed requests
- Loading States: Includes loading indicators for better UX